if(strcmp(cmdtext, "/pickup", true)==0) { new name[MAX_PLAYER_NAME]; new id = GetPlayeridMid(name); if(playerDB[id][cuffed]) SendClientMessage(playerid,zalia, "You're cuffed, can't do actions"); return 1; SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP); //3071 line return 1; }
(3071) : warning 225: unreachable code
if(strcmp(cmdtext, "/pickup", true)==0) { new name[MAX_PLAYER_NAME]; new id = GetPlayeridMid(name); if(playerDB[id][cuffed]) { SendClientMessage(playerid,zalia, "You're cuffed, can't do actions"); return 1; } SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP); //3071 line return 1; }
f(strcmp(cmdtext, "/pickup", true)==0) { new name[MAX_PLAYER_NAME]; new id = GetPlayeridMid(name); if(playerDB[id][cuffed]) SendClientMessage(playerid,zalia, "You're cuffed, can't do actions"); SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP); //3071 line return 1; }
Originally Posted by ledzep
Код:
if(strcmp(cmdtext, "/pickup", true)==0) { new name[MAX_PLAYER_NAME]; new id = GetPlayeridMid(name); if(playerDB[id][cuffed]) { SendClientMessage(playerid,zalia, "You're cuffed, can't do actions"); return 1; } SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP); //3071 line return 1; } |
Originally Posted by lakierka
No warning, but server sends me message unknow command still.
|
f(!strcmp(cmdtext, "/cuff", true,4)) { if(playerDB[playerid][specialybe]!=1){SendClientMessage(playerid,sviesiaigeltona,"* This command only for cops"); return 1;} if(cmdtext[4]==0){SendClientMessage(playerid,melyna,"* cuff player /cuff [partofname]"); return 1;} new vardas[MAX_PLAYER_NAME]; strmid(vardas,cmdtext[5],0,MAX_PLAYER_NAME); new id = GetPlayeridMid(vardas); if (id == INVALID_PLAYER_ID){ SendClientMessage(playerid, melyna, "* Wrong name."); return 1;} if (id == playerid){ SendClientMessage(playerid, melyna, "* You can't cuff yourself"); return 1;} new Float:Coo[3]; GetPlayerPos(id,Coo[0],Coo[1],Coo[2]); if(!PlayerToPoint(3, playerid, Coo[0],Coo[1],Coo[2])){SendClientMessage(playerid, melyna, "* Player too far."); return 1;} new msg[128],police[MAX_PLAYER_NAME]; GetPlayerName(playerid,police,sizeof(police)); GetPlayerName(id,vardas,sizeof(vardas)); if(playerDB[id][cuffed]) { playerDB[id][cuffed]=false; TogglePlayerControllable(id,false); format(msg,sizeof(msg),"cuffed %s.",vardas); SendClientMessage(playerid,melyna,msg); format(msg,sizeof(msg)," you've been cuffed by %s .",police); SendClientMessage(id,melyna,msg); }else{ playerDB[id][cuffed]=true; TogglePlayerControllable(id,true); format(msg,sizeof(msg),"Uncuff %s.",vardas); SendClientMessage(playerid,melyna,msg); format(msg,sizeof(msg),"you'v been uncuffed by %s.",police); SendClientMessage(id,melyna,msg); } return 1; }
if(strcmp(cmdtext, "/pickup", true)==0) { new vardas[MAX_PLAYER_NAME]; new id = GetPlayeridMid(vardas); if(playerDB[id][cuffed]) { SendClientMessage(playerid,zalia, "You're cuffed"); return 1; } SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP); return 1; }
PreloadAnimLib(playerid,"BOMBER");
PreloadAnimLib(playerid,"RAPPING");
PreloadAnimLib(playerid,"SHOP");
PreloadAnimLib(playerid,"BEACH");
PreloadAnimLib(playerid,"SMOKING");
PreloadAnimLib(playerid,"FOOD");
PreloadAnimLib(playerid,"ON_LOOKERS");
PreloadAnimLib(playerid,"DEALER");
PreloadAnimLib(playerid,"CRACK");
PreloadAnimLib(playerid,"CARRY");
PreloadAnimLib(playerid,"COP_AMBIENT");
PreloadAnimLib(playerid,"PARK");
PreloadAnimLib(playerid,"INT_HOUSE");
PreloadAnimLib(playerid,"FOOD");
PreloadAnimLib(playerid,"PED");
Originally Posted by dice7
Paste this under OnPlayerConnect
pawn Код:
|