27.09.2013, 06:40
• You have created a verb and used it on the some purpose you wanted for 'id' without settling it previously - resulted in respawning first logged player(ID: 0) which was a apperantly you.
• Instead of defining the verbal 'str_' with 128 and wasting multiple cells, next time just calculate the string's and the one who respawns the player.
- So yeah, that's pretty much it. Feel free to contact me if you need furture assistance:
• Instead of defining the verbal 'str_' with 128 and wasting multiple cells, next time just calculate the string's and the one who respawns the player.
- So yeah, that's pretty much it. Feel free to contact me if you need furture assistance:
PHP код:
CMD:respawn(playerid, params[])
{
new id, targetid, PlayerName[24], str_[62];
GetPlayerName(playerid, PlayerName, 24);
if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_RED1,"[ ! ] USAGE: /respawn [playerid]");
format(str_, 62), "[ ! ] %s has respawned you !", PlayerName);
SendClientMessage(id, COLOR_RED1, str_);
SetPlayerPos(id, 1721.9911,-1608.1677,13.5469);
return SetPlayerInterior(id, 0);
}