17.05.2017, 20:57
hi
i have this command and i wanna to change it to zcmd
can someone write for example ? <3
i have this command and i wanna to change it to zcmd
Код HTML:
if(strcmp(cmd, "/drag", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PINFO[playerid][pAdmin] <= 0)
{
SCM(playerid,COLOR_ERROR,"Error: Error: Your admin level isn't high enough to use this command");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_YELLOW, "Syntax: /drag <PlayerID/PartOfName>");
return 1;
}
new newcar = GetPlayerVehicleID(playerid);
new playa;
playa = ReturnUser(tmp);
if(!newcar) { SCM(playerid,COLOR_ERROR,"You are not in a vehicle."); return 1; }
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
PutPlayerInVehicle(playa,newcar,1);
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new sttr[256];
format(sttr,256,"Admin %s drags you to his/her vehicle.",sendername);
SCM(playa,COLOR_AdminWarn,sttr);
SCM(playerid,COLOR_ERROR,"Dragged.");
}
}
}
return 1;
}