Angel
Mesaje : 207 Data de înscriere : 07/01/2009 Varsta : 32 Localizare : petrosani
| Subiect: [SA:MP FileScript] Asa faci sa mearga comanda /setskin Dum Ian 11, 2009 3:58 pm | |
| Pentru a putea seta Skin-uri pe un server, intr-un Mod e nevoie de acesta : - Cod:
-
//----------------------------[Set Skin]---------------------------------------- if(strcmp(cmd, "/setskin", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] >= 4) { new tmp2[256]; tmp = strtok(cmdtext, idx); new otherplayer = strval(tmp); tmp2 = strtok(cmdtext, idx); new skin = strval(tmp2); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setskin [id] [idskin]"); return 1; } if(!strlen(tmp2)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setskin [id] [idskin]"); return 1; } SetPlayerSkin(otherplayer, skin); SendClientMessage(otherplayer, COLOR_YELLOW, "An admin changed your skin."); new amsg[256]; GetPlayerName(playerid, playername, sizeof(playername)); format(amsg, sizeof(amsg), "%s changed the skin of .", playername);
} else { SendClientMessage(playerid, COLOR_RED, "You are not admin !"); return 1; } } return 1; } Code-ul de mai sus il puneti in GameModul respectiv (pe care il folositi) cu Pawno, sau puteti face un File Script cu el si il adaugati in server.cfg . Dupa aceea puteti folosi comanda /setskin <Nick/ID> <SkinID>. Pentru SkinID intrati Aici . Code Credits : by BreaKer. Done. | |
|