[pawn] else if (strcmp(cmd, "rob", true) == 0) {
tmp = strtok( cmdtext, idx ); new plr = FindPlayerIDFromString( tmp );
if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
else if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_GREEN, "USAGE: /c rob [Nick/ID]" );
else if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );
else {
new Float:RX, Float:RY, Float:RZ, szMsg[256];
GetPlayerPos(playerid,RX,RY,RZ);
if(PlayerToPoint(3.0,plr,RX,RY,RZ))
format( szMsg, sizeof( szMsg ), "%s is stealing the wallet of %s", gPlayers[playerid],gPlayers[plr]);
SendClientMessageToAll( COLOR_RED, szMsg );
SetTimer("robando", 7000, false);
TogglePlayerControllable(playerid,0);
IncPlayerHandCash(playerid,150);
DecPlayerHandCash(plr,150);
Billetera[playerid] = 1;
SetPlayerMarker(playerid,15);
}
return 1;
}[/pawn]
this is not rob other player this is rob yourself