31.08.2009, 06:24
I can only give you /freeze,/unfreeze (without adminmod,if you want tell me)
Unfreeze
Код:
if(strcmp(cmd, "/freeze", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /freeze [playerid/PartOfName]"); return 1; } new playa; playa = ReturnUser(tmp); if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { GetPlayerName(playa, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); TogglePlayerControllable(playa, 0); format(string, sizeof(string), "%s Freezes %s",sendername, giveplayer); printf("%s",string); } } } return 1; }
Код:
if(strcmp(cmd, "/unfreeze", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /unfreeze [playerid]"); return 1; } new playa; playa = ReturnUser(tmp); if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { GetPlayerName(playa, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); TogglePlayerControllable(playa, 1); format(string, sizeof(string), "%s unfreezes %s",sendername, giveplayer); printf("%s",string); } } } return 1; }